package com.zzyl.nursing.job;

import com.zzyl.nursing.service.IReservationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("reservationJob")
@Slf4j
// 移除@AllArgsConstructor注解，避免与无参构造函数冲突
public class ReservationJob {
    @Autowired
    private IReservationService reservationService;

    // 显式声明无参构造函数
    public ReservationJob() {
    }

    public void updateReservationStatus() {
        log.info("开始执行预约状态更新任务");
        reservationService.updateReservationStatus();
        log.info("结束执行预约状态更新任务");
    }
}